package com.example.demo;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.demo.databinding.FragmentBlankBinding;

// 需要在build.gradle（app的那个）里的android下添加buildFeatures {viewBinding true}
public class BlankFragment extends Fragment {

    public BlankFragment() {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        FragmentBlankBinding inflate = FragmentBlankBinding.inflate(inflater, container, false);
        inflate.tv.setText("你好呀");
        return inflate.getRoot();
    }
}